package com.chenyaowei.payment.service.impl;

import java.util.List;
import com.chenyaowei.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chenyaowei.payment.mapper.CywPaymentInfoMapper;
import com.chenyaowei.payment.domain.CywPaymentInfo;
import com.chenyaowei.payment.service.ICywPaymentInfoService;

/**
 * 支付信息Service业务层处理
 * 
 * @author 陈耀威
 * @date 2023-12-03
 */
@Service
public class CywPaymentInfoServiceImpl implements ICywPaymentInfoService 
{
    @Autowired
    private CywPaymentInfoMapper cywPaymentInfoMapper;

    /**
     * 查询支付信息
     * 
     * @param id 支付信息主键
     * @return 支付信息
     */
    @Override
    public CywPaymentInfo selectCywPaymentInfoById(Long id)
    {
        return cywPaymentInfoMapper.selectCywPaymentInfoById(id);
    }

    /**
     * 查询支付信息列表
     * 
     * @param cywPaymentInfo 支付信息
     * @return 支付信息
     */
    @Override
    public List<CywPaymentInfo> selectCywPaymentInfoList(CywPaymentInfo cywPaymentInfo)
    {
        return cywPaymentInfoMapper.selectCywPaymentInfoList(cywPaymentInfo);
    }

    /**
     * 新增支付信息
     * 
     * @param cywPaymentInfo 支付信息
     * @return 结果
     */
    @Override
    public int insertCywPaymentInfo(CywPaymentInfo cywPaymentInfo)
    {
        cywPaymentInfo.setCreateTime(DateUtils.getNowDate());
        return cywPaymentInfoMapper.insertCywPaymentInfo(cywPaymentInfo);
    }

    /**
     * 修改支付信息
     * 
     * @param cywPaymentInfo 支付信息
     * @return 结果
     */
    @Override
    public int updateCywPaymentInfo(CywPaymentInfo cywPaymentInfo)
    {
        return cywPaymentInfoMapper.updateCywPaymentInfo(cywPaymentInfo);
    }

    /**
     * 批量删除支付信息
     * 
     * @param ids 需要删除的支付信息主键
     * @return 结果
     */
    @Override
    public int deleteCywPaymentInfoByIds(Long[] ids)
    {
        return cywPaymentInfoMapper.deleteCywPaymentInfoByIds(ids);
    }

    /**
     * 删除支付信息信息
     * 
     * @param id 支付信息主键
     * @return 结果
     */
    @Override
    public int deleteCywPaymentInfoById(Long id)
    {
        return cywPaymentInfoMapper.deleteCywPaymentInfoById(id);
    }
}
